package org.zoomdev.zoom.dao.driver;

import org.zoomdev.zoom.dao.Databases;
import org.zoomdev.zoom.dao.SqlDriver;
import org.zoomdev.zoom.dao.driver.h2.H2Driver;
import org.zoomdev.zoom.dao.driver.mysql.MysqlDriver;

public class SqlDriverFactory {

    public static SqlDriver createByProduct(String productName) {
        if (Databases.MYSQL.equals(productName)) {
            return new MysqlDriver();
        }

        if (Databases.H2.equals(productName)) {
            return new H2Driver();
        }
        return null;
    }
}
